<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibDriver CH9121: example/driver_ch9121_basic.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibDriver CH9121
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
   <div id="projectbrief">CH9121 full function driver</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('driver__ch9121__basic_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">driver_ch9121_basic.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="driver__ch9121__basic_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#ifndef DRIVER_CH9121_BASIC_H</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#define DRIVER_CH9121_BASIC_H</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="driver__ch9121__interface_8h.html">driver_ch9121_interface.h</a>&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>{</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#gae43cf4da523fc2010ef9f4151d78adb1">   56</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_DHCP                       CH9121_BOOL_FALSE        </span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#ga9cec53fe494d763048810abef30e89ba">   57</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_PORT                  9600                     </span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#gae4fc342781ce4da8695de0e8b7760682">   58</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_DATA_BIT              8                        </span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#gaceeebdece983c6c3796560baa167f2a9">   59</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_STOP_BIT              1                        </span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#gab8c48dbfa5ed45f6fd56a68ac315e5d0">   60</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_PARITY                CH9121_PARITY_NONE       </span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#ga67e8c157bd65fd5e4e4e1032f30e7785">   61</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_TIMEOUT               10                       </span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#ga2af24f28e2981e1cf0e361e9b6dcc61a">   62</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_SOURCE_PORT_RANDOM    CH9121_BOOL_FALSE        </span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#ga97382779271603aaaa8b95d5dd5efa99">   63</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_BUFFER_LENGTH         1024                     </span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#ga67773a3dd2477eccee1eb738e43a17ff">   64</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_FLUSH                 CH9121_BOOL_FALSE        </span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#ga74f4cb2e39990e8bebf49eee4b9e75f0">   65</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_UART_PORT2                 CH9121_BOOL_FALSE        </span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__ch9121__example__driver.html#gaf19d2fa44856eca0f025b308b1d2c764">   66</a></span>&#160;<span class="preprocessor">#define CH9121_BASIC_DEFAULT_DISCONNECT_WITH_NO_RJ45    CH9121_BOOL_TRUE         </span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;uint8_t <a class="code" href="group__ch9121__example__driver.html#gab9388c53c09f78fb9a70a3696c24a61a">ch9121_basic_init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;uint8_t <a class="code" href="group__ch9121__example__driver.html#gab41a6a4565936fb46ae8a0efb117bc74">ch9121_basic_deinit</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;uint8_t <a class="code" href="group__ch9121__example__driver.html#ga6c033cb180df43356f3e22c67f655c01">ch9121_basic_read</a>(uint8_t *buf, uint16_t *len);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;uint8_t <a class="code" href="group__ch9121__example__driver.html#gae88d5f3d8f1b898d484cb54e646ca1e9">ch9121_basic_write</a>(uint8_t *buf, uint16_t len);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;uint8_t <a class="code" href="group__ch9121__example__driver.html#gab461704b5eec5d42a6e5af4a4be0064f">ch9121_basic_config</a>(<a class="code" href="group__ch9121__base__driver.html#gaa237c01198f7eefe10d865ae5acef0f8">ch9121_port_t</a> uart_port, <a class="code" href="group__ch9121__base__driver.html#ga1885e76e565351e002b873668e4a9d16">ch9121_mode_t</a> mode,</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                            uint8_t ip[4], uint16_t port, </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                            uint8_t mask[4], uint8_t gateway[4],</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                            uint8_t dest_ip[4], uint16_t dest_port);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;}</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="adriver__ch9121__interface_8h_html"><div class="ttname"><a href="driver__ch9121__interface_8h.html">driver_ch9121_interface.h</a></div><div class="ttdoc">driver ch9121 interface header file</div></div>
<div class="ttc" id="agroup__ch9121__base__driver_html_ga1885e76e565351e002b873668e4a9d16"><div class="ttname"><a href="group__ch9121__base__driver.html#ga1885e76e565351e002b873668e4a9d16">ch9121_mode_t</a></div><div class="ttdeci">ch9121_mode_t</div><div class="ttdoc">ch9121 mode enumeration definition</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121_8h_source.html#l00096">driver_ch9121.h:97</a></div></div>
<div class="ttc" id="agroup__ch9121__base__driver_html_gaa237c01198f7eefe10d865ae5acef0f8"><div class="ttname"><a href="group__ch9121__base__driver.html#gaa237c01198f7eefe10d865ae5acef0f8">ch9121_port_t</a></div><div class="ttdeci">ch9121_port_t</div><div class="ttdoc">ch9121 port enumeration definition</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121_8h_source.html#l00069">driver_ch9121.h:70</a></div></div>
<div class="ttc" id="agroup__ch9121__example__driver_html_ga6c033cb180df43356f3e22c67f655c01"><div class="ttname"><a href="group__ch9121__example__driver.html#ga6c033cb180df43356f3e22c67f655c01">ch9121_basic_read</a></div><div class="ttdeci">uint8_t ch9121_basic_read(uint8_t *buf, uint16_t *len)</div><div class="ttdoc">basic example read data</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121__basic_8c_source.html#l00287">driver_ch9121_basic.c:287</a></div></div>
<div class="ttc" id="agroup__ch9121__example__driver_html_gab41a6a4565936fb46ae8a0efb117bc74"><div class="ttname"><a href="group__ch9121__example__driver.html#gab41a6a4565936fb46ae8a0efb117bc74">ch9121_basic_deinit</a></div><div class="ttdeci">uint8_t ch9121_basic_deinit(void)</div><div class="ttdoc">basic example deinit</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121__basic_8c_source.html#l00323">driver_ch9121_basic.c:323</a></div></div>
<div class="ttc" id="agroup__ch9121__example__driver_html_gab461704b5eec5d42a6e5af4a4be0064f"><div class="ttname"><a href="group__ch9121__example__driver.html#gab461704b5eec5d42a6e5af4a4be0064f">ch9121_basic_config</a></div><div class="ttdeci">uint8_t ch9121_basic_config(ch9121_port_t uart_port, ch9121_mode_t mode, uint8_t ip[4], uint16_t port, uint8_t mask[4], uint8_t gateway[4], uint8_t dest_ip[4], uint16_t dest_port)</div><div class="ttdoc">basic example config</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121__basic_8c_source.html#l00095">driver_ch9121_basic.c:95</a></div></div>
<div class="ttc" id="agroup__ch9121__example__driver_html_gab9388c53c09f78fb9a70a3696c24a61a"><div class="ttname"><a href="group__ch9121__example__driver.html#gab9388c53c09f78fb9a70a3696c24a61a">ch9121_basic_init</a></div><div class="ttdeci">uint8_t ch9121_basic_init(void)</div><div class="ttdoc">basic example init</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121__basic_8c_source.html#l00048">driver_ch9121_basic.c:48</a></div></div>
<div class="ttc" id="agroup__ch9121__example__driver_html_gae88d5f3d8f1b898d484cb54e646ca1e9"><div class="ttname"><a href="group__ch9121__example__driver.html#gae88d5f3d8f1b898d484cb54e646ca1e9">ch9121_basic_write</a></div><div class="ttdeci">uint8_t ch9121_basic_write(uint8_t *buf, uint16_t len)</div><div class="ttdoc">basic example write data</div><div class="ttdef"><b>Definition:</b> <a href="driver__ch9121__basic_8c_source.html#l00306">driver_ch9121_basic.c:306</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html">example</a></li><li class="navelem"><a class="el" href="driver__ch9121__basic_8h.html">driver_ch9121_basic.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
